package com.yuwubao.framework.loginFilter;

import com.yuwubao.framework.bean.JsonResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionAdvice {

    @ResponseBody
    @ExceptionHandler(Exception.class)
    JsonResult exceptionHandler(Exception e) {
        JsonResult result = new JsonResult();
        result.setFailure("系统异常");
        return result;
    }
}

